<?php echo $header; ?>
<div class="container make-bg">
<?php echo $content_top; ?>

  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
      <?php echo $breadcrumb['separator']; ?>
      <a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </ul>
  <div class="row">
  <div class="span9 post">
    <h2 class="page-header"><span><?php echo $heading_title; ?></span></h2>
        <div class="sidebar-line"><span></span></div>                    
          <article class="single-post">
            <ul class="post-meta">
              <li>
                <i class="icon-fixed-width icon-user"></i> <a class="url fn">Filiz Doe</a>
              </li>
              <li>
                <i class="icon-fixed-width icon-calendar"></i> <?php echo $date_added; ?>
              </li>
              <li>
                <i class="icon-fixed-width icon-comments"></i> <a href="<?php echo $current_url; ?>#comments"><?php echo $total_comments; ?></a>
              </li>
            </ul>
              <div class="blogimg">
                <img class="img-polaroid" src="catalog/view/theme/bistro/demo-images/01_single-blog.jpg" width="860" alt="" />
                 <div style="margin-top: 15px; margin-bottom: 20px; font-weight: bold;"><?php echo $short_description; ?></div>
                <?php echo $description; ?>
                <div class="deal-share">
                    <!-- AddThis Button BEGIN -->
                    <div class="addthis_toolbox addthis_default_style">
                    <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
                    <a class="addthis_button_tweet"></a>
                    <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
                    <a class="addthis_counter addthis_pill_style"></a>
                    </div>
                    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=undefined"></script>
                    <!-- AddThis Button END -->
                </div>
                   
          <?php if ($allow_comment) { ?>             
          <section class="comments" id="comments">
            <h3 class="page-header"><?php echo $tab_comment; ?></h3>
            <div id="comment"></div><br />
          </section><!-- .comments -->

          <section id="write_comment">
            <h3 class="page-header"><?php echo $text_write; ?></h3>
            <b><?php echo $entry_name; ?></b><br />
            <input type="text" name="name" value="<?php echo $customer_name; ?>" />
            <br /><br />
            <b><?php echo $entry_email; ?></b><br />
            <input type="text" name="email" value="<?php echo $customer_email; ?>" />
            <br /><br />
            <b><?php echo $entry_comment; ?></b>
            <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea><br />
            <br />    
            <b><?php echo $entry_captcha; ?></b><br />
            <input type="text" name="captcha" value="" />
            <br />
            <img src="index.php?route=news/news/captcha" alt="" id="captcha" /><br />
            <div id="comment-title"></div>
             <div class="left"><a id="button-comment" class="button btn btn-general"><span><?php echo $button_send; ?></span></a></div>   
          </section>
        <?php } ?>
            
        </article>
        <?php if ($allow_comment) { ?>
        <script type="text/javascript"><!--
        $('#comment .pagination a').live('click', function() {
          $('#comment').slideUp('slow');
            
          $('#comment').load(this.href);
          
          $('#comment').slideDown('slow');
          
          return false;
        });     

        $('#comment').load('index.php?route=news/news/comment&news_id=<?php echo $news_id; ?>');

        $('#button-comment').bind('click', function() {
          $.ajax({
            type: 'POST',
            url: 'index.php?route=news/news/write&news_id=<?php echo $news_id; ?>&approved=<?php echo $approved; ?>',
            dataType: 'json',
            data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&email=' + encodeURIComponent($('input[name=\'email\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
            beforeSend: function() {
              $('.success, .warning').remove();
              $('#button-comment').attr('disabled', true);
              $('#comment-title').after('<div class="attention" style="margin:10px 0;"><img style="margin:0;" src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
            },
            complete: function() {
              $('#button-comment').attr('disabled', false);
              $('.attention').remove();
            },
            success: function(data) {
              if (data.error) {
                $('#comment-title').after('<div class="warning" style="margin:10px 0;">' + data.error + '</div>');
              }
              
              if (data.success) {
                $('#comment-title').after('<div class="success" style="margin:10px 0;">' + data.success + '</div>');
                        
                $('input[name=\'name\']').val('');
                $('input[name=\'email\']').val('');
                $('textarea[name=\'text\']').val('');
                $('input[name=\'captcha\']').val('');
              }
            }
          });
        });
        //--></script>
        <script type="text/javascript"><!--
        jQuery(document).ready(function($) {
         
          $(".scroll").click(function(event){   
            event.preventDefault();
            $('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
          });
        });
        //--></script>
        <?php } ?>
  </div>
  <div class="span3 sidebar">

      <?php echo $column_right; ?>
    </div>
    </div>
 </div>
<?php echo $footer; ?>  